home *** CD-ROM | disk | FTP | other *** search
/ PC Basics 53 / PC Basics Issue 53.iso / Software / Internet / Invboard.exe / PC Basics 53 / Invboard / upload / sources / misc / legends.php < prev    next >
Encoding:
PHP Script  |  2002-06-12  |  2.8 KB  |  109 lines

  1. <?php
  2.  
  3. /*
  4. +--------------------------------------------------------------------------
  5. |   IBFORUMS v1
  6. |   ========================================
  7. |   by Matthew Mecham and David Baxter
  8. |   (c) 2001,2002 IBForums
  9. |   http://www.ibforums.com
  10. |   ========================================
  11. |   Web: http://www.ibforums.com
  12. |   Email: phpboards@ibforums.com
  13. |   Licence Info: phpib-licence@ibforums.com
  14. +---------------------------------------------------------------------------
  15. |
  16. |   > Show all emo's / BB Tags module
  17. |   > Module written by Matt Mecham
  18. |   > Date started: 18th April 2002
  19. |
  20. |    > Module Version Number: 1.0.0
  21. +--------------------------------------------------------------------------
  22. */
  23.  
  24.  
  25. $idx = new legends;
  26.  
  27. class legends {
  28.  
  29.     var $output    = "";
  30.     var $base_url  = "";
  31.     var $html      = "";
  32.  
  33.     function legends() {
  34.     
  35.         //------------------------------------------------------
  36.         // $is_sub is a boolean operator.
  37.         // If set to 1, we don't show the "topic subscribed" page
  38.         // we simply end the subroutine and let the caller finish
  39.         // up for us.
  40.         //------------------------------------------------------
  41.     
  42.         global $ibforums, $DB, $std, $print, $skin_universal;
  43.         
  44.         $ibforums->lang    = $std->load_words($ibforums->lang, 'lang_legends', $ibforums->lang_id );
  45.  
  46.         require "./Skin/".$ibforums->skin_id."/skin_legends.php";
  47.         $this->html = new skin_legends();
  48.         
  49.         $this->base_url        = "{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}?s={$ibforums->session_id}";
  50.         
  51.         
  52.         
  53.         //--------------------------------------------
  54.         // What to do?
  55.         //--------------------------------------------
  56.         
  57.         switch($ibforums->input['CODE'])
  58.         {
  59.             case 'emoticons':
  60.                 $this->show_emoticons();
  61.                 break;
  62.             
  63.             default:
  64.                 $this->show_emoticons();
  65.                 break;
  66.         }
  67.         
  68.         // If we have any HTML to print, do so...
  69.         
  70.         $print->pop_up_window( $this->page_title, $this->output );
  71.             
  72.      }
  73.      
  74.      function show_emoticons()
  75.      {
  76.          global $ibforums, $DB, $std;
  77.          
  78.          $this->page_title = $ibforums->lang['emo_title'];
  79.          
  80.          $this->output .= $this->html->emoticon_javascript();
  81.          
  82.          $this->output .= $this->html->page_header( $ibforums->lang['emo_title'], $ibforums->lang['emo_type'], $ibforums->lang['emo_img'] );
  83.          
  84.          $DB->query("SELECT typed, image from ibf_emoticons");
  85.             
  86.         if ( $DB->get_num_rows() )
  87.         {
  88.             while ( $r = $DB->fetch_row() )
  89.             {
  90.                 $this->output .= $this->html->emoticons_row( stripslashes($r['typed']), stripslashes($r['image']) );
  91.                                             
  92.             }
  93.         }
  94.         
  95.         $this->output .= $this->html->page_footer();
  96.         
  97.      }
  98.      
  99.      
  100.         
  101. }
  102.  
  103. ?>
  104.  
  105.  
  106.  
  107.  
  108.  
  109.